﻿<Fluent:RibbonWindow  x:Class="Hisaab.Windows.Client.FluentMainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
        xmlns:ViewModel="clr-namespace:Hisaab.Windows.Client.ViewModel"
        xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent" Title="{Binding Title}" Height="584" Width="1029"
        Icon="/Images/app.ico">
    <!--xmlns:themes="clr-namespace:WPF.Themes;assembly=WPF.Themes" themes:ThemeManager.Theme="BureauBlue"-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Fluent:Ribbon Name="mainRibbon" AutomaticStateManagement="True" >

            <Fluent:Ribbon.ContextualGroups>
                <Fluent:RibbonContextualTabGroup x:Name="cmAccount"               Header="Account"              Background="Green"         BorderBrush="DarkGreen" />
                <Fluent:RibbonContextualTabGroup x:Name="cmTag"                   Header="Tag"                  Background="DarkBlue"      BorderBrush="Navy"/>
                <Fluent:RibbonContextualTabGroup x:Name="cmTransaction"           Header="Transaction"          Background="Chocolate"     BorderBrush="Brown"/>
                <Fluent:RibbonContextualTabGroup x:Name="cmVehicle"               Header="Vehicle"              Background="DeepPink"      BorderBrush="Indigo"/>
                <Fluent:RibbonContextualTabGroup x:Name="cmVehicleTransaction"    Header="VehicleTransaction"   Background="DeepSkyBlue"   BorderBrush="DarkBlue"/>
            </Fluent:Ribbon.ContextualGroups>

            <Fluent:Ribbon.Menu>
                <Fluent:Backstage Background="Green">
                    <Fluent:BackstageTabControl>
                        <Fluent:BackstageTabItem Header="New" Fluent:KeyTip.Keys="N">

                            <StackPanel Orientation="Vertical">
                                <Fluent:Button Fluent:KeyTip.Keys="T" Header="New Transaction"          Icon="/Images/Small/transaction_add.png"        Command="{Binding Path=NewTransactionCommand}"/>
                                <Fluent:Button Fluent:KeyTip.Keys="V" Header="New Vehicle Transaction"  Icon="/Images/Small/vehicletransaction_add.png" Command="{Binding Path=NewVehicleTransactionCommand}"/>
                                <Fluent:Button Fluent:KeyTip.Keys="G" Header="New Tag"                  Icon="/Images/Small/Tag_add.png"        Command="{Binding Path=NewTagCommand}" />
                                <Fluent:Button Fluent:KeyTip.Keys="A" Header="New Account"              Icon="/Images/Small/account_add.png"    Command="{Binding Path=NewAccountCommand}" />
                                <Fluent:Button Fluent:KeyTip.Keys="H" Header="New Vehicle"              Icon="/Images/Small/vehicle_add.png"        Command="{Binding Path=NewVehicleCommand}" />
                            </StackPanel>
                        </Fluent:BackstageTabItem>
                        <Fluent:Button Name="saveButton" Header="Save" Icon="/Images/Small/Save.png" Fluent:KeyTip.Keys="S" Command="{Binding SaveCommand}"/>
                        <Fluent:BackstageTabItem Header="Import"    Fluent:KeyTip.Keys="N"></Fluent:BackstageTabItem>
                        <Fluent:BackstageTabItem Header="Export"    Fluent:KeyTip.Keys="N"></Fluent:BackstageTabItem>
                        <Fluent:BackstageTabItem Header="Backup"    Fluent:KeyTip.Keys="N"></Fluent:BackstageTabItem>
                        <Fluent:BackstageTabItem Header="Options"   Fluent:KeyTip.Keys="N">
                            <TabControl Margin="20,5,20,5" Style="{DynamicResource InnerBackstageTabControlStyle}">
                                <Fluent:SeparatorTabItem Header="User"/>
                                <TabItem Header="1"></TabItem>
                                <TabItem Header="2"></TabItem>
                                <TabItem Header="3"></TabItem>
                                <Fluent:SeparatorTabItem Header="Storage"/>
                                <TabItem Header="4"></TabItem>
                            </TabControl>
                        </Fluent:BackstageTabItem>
                        <Fluent:Button Header="Exit" Icon="/Images/Small/Exit.png" Fluent:KeyTip.Keys="X" Command="{Binding ExitCommand}"/>
                    </Fluent:BackstageTabControl>
                </Fluent:Backstage>
            </Fluent:Ribbon.Menu>
            <!-- Toolbar items -->
            <Fluent:Ribbon.ToolBarItems>
                <Fluent:Button Size="Small" Icon="{StaticResource HelpIcon}" Command="{Binding HelpCommand }"/>
            </Fluent:Ribbon.ToolBarItems>
            <!-- Quick Access Items-->
            <Fluent:Ribbon.QuickAccessItems>
                <Fluent:QuickAccessMenuItem Target="{Binding ElementName=saveButton}" />
            </Fluent:Ribbon.QuickAccessItems>
            <!-- Tabs -->
            <Fluent:RibbonTabItem   x:Name="homeTabItem" Header="Home" Fluent:KeyTip.Keys="H" >
                <Fluent:RibbonGroupBox Fluent:KeyTip.Keys="N" Header="New">
                    <Fluent:Button Fluent:KeyTip.Keys="T" Header="New Transaction"          LargeIcon="/Images/Large/transaction_add.png"        SizeDefinition="Large" Command="{Binding Path=NewTransactionCommand}"  />
                    <Fluent:Button Fluent:KeyTip.Keys="V" Header="New Vehicle Transaction"  LargeIcon="/Images/Large/vehicletransaction_add.png" SizeDefinition="Large" Command="{Binding Path=NewVehicleTransactionCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="G" Header="New Tag"                  Icon="/Images/Small/Tag_add.png"                    SizeDefinition="Middle" Command="{Binding Path=NewTagCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="A" Header="New Account"              Icon="/Images/Small/account_add.png"                SizeDefinition="Middle" Command="{Binding Path=NewAccountCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="H" Header="New Vehicle"              Icon="/Images/Small/vehicle_add.png"                SizeDefinition="Middle" Command="{Binding Path=NewVehicleCommand}" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Fluent:KeyTip.Keys="N" Header="Tools">
                    <Fluent:Button Fluent:KeyTip.Keys="C" Header="Calculator" LargeIcon="/Images/Large/Calculator.png"     SizeDefinition="Large"                 Command="{Binding Path=OpenCalculatorCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem   x:Name="viewTabItem" Header="View" Fluent:KeyTip.Keys="V" >
                <Fluent:RibbonGroupBox Fluent:KeyTip.Keys="L" Header="Lists">
                    <Fluent:Button Fluent:KeyTip.Keys="A" Header="Accounts"            LargeIcon="/Images/Large/account.png"            SizeDefinition="Large" Command="{Binding Path=OpenAccountsCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="G" Header="Tags"                LargeIcon="/Images/Large/tag.png"                SizeDefinition="Large" Command="{Binding Path=OpenTagsCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="T" Header="Transactions"        LargeIcon="/Images/Large/Transaction.png"        SizeDefinition="Large" Command="{Binding Path=OpenTransactionsCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="H" Header="Vehicles"            LargeIcon="/Images/Large/Vehicle.png"            SizeDefinition="Large" Command="{Binding Path=OpenVehiclesCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="V" Header="VehicleTransactions" LargeIcon="/Images/Large/transfer.png"           SizeDefinition="Large" Command="{Binding Path=OpenVehicleTransactionsCommand}" />
                </Fluent:RibbonGroupBox >
            </Fluent:RibbonTabItem>
            <!-- Contextual Tabs -->
            <Fluent:RibbonTabItem Header="Accounts" Group="{Binding ElementName=cmAccount, Mode=OneWay}" >
                <Fluent:RibbonGroupBox Header="Edit Account" >
                    <Fluent:Button Fluent:KeyTip.Keys="R" Header="Refresh"              LargeIcon="/Images/Large/Refresh.png"            SizeDefinition="Large" Command="{x:Static ViewModel:AccountsViewModel.RefreshCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="E" Header="Edit"                 LargeIcon="/Images/Large/tag.png"                SizeDefinition="Large" Command="{x:Static ViewModel:AccountsViewModel.EditCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="D" Header="Delete"               LargeIcon="/Images/Large/Transaction.png"        SizeDefinition="Large" Command="{x:Static ViewModel:AccountsViewModel.DeleteCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Tag" Group="{Binding ElementName=cmTag, Mode=OneWay}">
                <Fluent:RibbonGroupBox Header="Edit Tag" >
                    <Fluent:Button Fluent:KeyTip.Keys="R" Header="Refresh"              LargeIcon="/Images/Large/Refresh.png"            SizeDefinition="Large" Command="{x:Static ViewModel:TagsViewModel.RefreshCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="E" Header="Edit"                 LargeIcon="/Images/Large/tag.png"                SizeDefinition="Large" Command="{x:Static ViewModel:TagsViewModel.EditCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="D" Header="Delete"               LargeIcon="/Images/Large/Transaction.png"        SizeDefinition="Large" Command="{x:Static ViewModel:TagsViewModel.DeleteCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Transaction" Group="{Binding ElementName=cmTransaction, Mode=OneWay}">
                <Fluent:RibbonGroupBox Header="Edit Transaction" >
                    <Fluent:Button Fluent:KeyTip.Keys="R" Header="Refresh"              LargeIcon="/Images/Large/Refresh.png"            SizeDefinition="Large" Command="{x:Static ViewModel:TransactionsViewModel.RefreshCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="E" Header="Edit"                 LargeIcon="/Images/Large/tag.png"                SizeDefinition="Large" Command="{x:Static ViewModel:TransactionsViewModel.EditCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="D" Header="Delete"               LargeIcon="/Images/Large/Transaction.png"        SizeDefinition="Large" Command="{x:Static ViewModel:TransactionsViewModel.DeleteCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Vehicles" Group="{Binding ElementName=cmVehicle, Mode=OneWay}">
                <Fluent:RibbonGroupBox Header="Edit Vehicle" >
                    <Fluent:Button Fluent:KeyTip.Keys="R" Header="Refresh"              LargeIcon="/Images/Large/Refresh.png"            SizeDefinition="Large" Command="{x:Static ViewModel:VehiclesViewModel.RefreshCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="E" Header="Edit"                 LargeIcon="/Images/Large/tag.png"                SizeDefinition="Large" Command="{x:Static ViewModel:VehiclesViewModel.EditCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="D" Header="Delete"               LargeIcon="/Images/Large/Transaction.png"        SizeDefinition="Large" Command="{x:Static ViewModel:VehiclesViewModel.DeleteCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Vehicle Transaction" Group="{Binding ElementName=cmVehicleTransaction, Mode=OneWay}">
                <Fluent:RibbonGroupBox Header="Edit Vehicle Transaction" >
                    <Fluent:Button Fluent:KeyTip.Keys="R" Header="Refresh"              LargeIcon="/Images/Large/Refresh.png"            SizeDefinition="Large" Command="{x:Static ViewModel:VehicleTransactionsViewModel.RefreshCommand}"/>
                    <Fluent:Button Fluent:KeyTip.Keys="E" Header="Edit"                 LargeIcon="/Images/Large/tag.png"                SizeDefinition="Large" Command="{x:Static ViewModel:VehicleTransactionsViewModel.EditCommand}" />
                    <Fluent:Button Fluent:KeyTip.Keys="D" Header="Delete"               LargeIcon="/Images/Large/Transaction.png"        SizeDefinition="Large" Command="{x:Static ViewModel:VehicleTransactionsViewModel.DeleteCommand}"/>
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
        </Fluent:Ribbon>
        <ad:DockingManager x:Name="dockManager" Grid.Row="1">
            <ad:DocumentPane x:Name="mainDocumentHost" />
        </ad:DockingManager>
        <Fluent:StatusBar HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Grid.Row="2" Height="25">
            <Fluent:StatusBarItem Title="Words Width" Value="Ready" HorizontalAlignment="Left" />
        </Fluent:StatusBar>
    </Grid>
</Fluent:RibbonWindow>